package com.cloud.activiti.service;

import java.util.Map;

/**
 * 流程的服务
 */
public interface ActivitiExecuteService {
    /**
     * 发布流程
     * @param classpathResource
     * @param name
     * @param category
     * @return
     */
    String deploy(String classpathResource,String name,String category);

    /**
     * 开始流程
     * @param processDefinitionKey
     * @param businessKey
     * @param variables
     * @return
     */
    String startProcessInstanceByKey(String processDefinitionKey, String businessKey, Map<String, Object> variables);

    /**
     * 完成任务
     * @param taskId
     */
    void completeTask(String taskId,Map<String, Object> map);

    /**
     * 手动编码生成流程图
     */
    void deployAddBpmnModel();

    /**
     * form表达提交
     * @param processDefinitionId
     * @param businessKey
     * @param properties
     * @return
     */
    String submitStartFormData(String processDefinitionId, String businessKey, Map<String, String> properties);

    void convertBpmnModel() throws Exception;

    void submitTaskFormData(String taskId, Map<String, String> properties);

    void saveFormData(String taskId, Map<String, String> properties);
}
